home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
p063b9s.zip
/
UNIT
/
AREAMAN.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-03-02
|
3KB
|
103 lines
UNIT AreaMan;
{╔══════════════════════════════════════════════════════════════════════════╗}
{║ File areamanager Last changed: 02.03.97 SA ║}
{║ ║}
{║ (C) Copyright 1989-97 by ║}
{║ Dan Wulff, Jens Sandalgaard, Steen Christensen & S¢ren Ager ║}
{║ ║}
{║ This source may not be given to anybody, without the written permission ║}
{║ from The Portal Team. ║}
{╚══════════════════════════════════════════════════════════════════════════╝}
{$I POPDEFS.INC}
INTERFACE
USES Use32, Globals;
VAR
Area : AreaTabPtr;
NumArea : Integer;
PROCEDURE AreaManager;
IMPLEMENTATION
USES Dos, OpCrt, OpString,
StrUtil, Display, Input, Keyboard, InterCom, OproUtil, Util, MailUtil,
LogFile, NodeList, AreaMisc, AMList, AMFBBS, AMRA2, PopTypes;
Procedure ProcessFDB;
VAR
AM : ^RaList;
Begin
NEW(Am,Init);
IF Am<>NIL THEN
BEGIN
IF NumArea=0 THEN
BEGIN
Topic:=52;
MyWin(Am^.Temp,3,8,77,11,3,'ERROR',False);
WITH Am^.Temp^ DO
BEGIN
wFastWrite('NO Areas found - Be sure to have defined BBSType & BBSPath properly in',
1,2,cfg.color[3].TextColor);
wFastWrite('your PORTAL configuration. Hit ANY KEY to continue',2,2,cfg.color[3].TextColor);
PopReadKeyWord;
END;
KillWindow(Am^.Temp);
END ELSE
am^.AreaManagerMain;
Dispose(AM, Done);
END ELSE
AddLog('!', 'Not enough memory to initialize Area Manager');
END;
Procedure ProcessFilesBBS;
VAR
AM : ^FilesbbsType;
Begin
NEW(Am,Init);
IF Am<>NIL THEN
BEGIN
IF NumArea=0 THEN
BEGIN
Topic:=52;
MyWin(Am^.Temp,3,8,77,11,3,'ERROR',False);
WITH Am^.Temp^ DO
BEGIN
wFastWrite('NO Areas found - Be sure to have defined BBSType & BBSPath properly in',
1,2,cfg.color[3].TextColor);
wFastWrite('your PORTAL configuration. Hit ANY KEY to continue',2,2,cfg.color[3].TextColor);
PopReadKeyWord;
END;
KillWindow(Am^.Temp);
END ELSE
am^.AreaManagerMain;
am^.Done;
Dispose(AM);
END ELSE
AddLog('!', 'Not enough memory to initialize Area Manager');
End;
Procedure Areamanager;
BEGIN
{$IFNDEF PoPLite}
FillChar(Call, SizeOf(Call), 0);
IF Not SetInterCom(ICAreaMan,Call,True) THEN Exit;
FreeUpMemory;
New(Area);
NumArea:=ReadFileAreas(Area);
IF Fdbpath<>''THEN { hvis Ra2.x }
ProcessFDB
ELSE
ProcessfilesBBS;
DisposeFileAreas(Area,NumArea);
Dispose(Area);
Initialisenodelist(cfg.NodeList,cfg.nodelisttyp);
{$ELSE}
AskError(10, 'Not implemented in Portal of Power/Lite', 2);
{$ENDIF}
END;
END.